package cn.iocoder.yudao.module.english.dal.mysql.evaluationphrases;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.english.dal.dataobject.evaluationphrases.EvaluationPhrasesDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.english.controller.admin.evaluationphrases.vo.*;

/**
 * 评价常用语 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface EvaluationPhrasesMapper extends BaseMapperX<EvaluationPhrasesDO> {

    default PageResult<EvaluationPhrasesDO> selectPage(EvaluationPhrasesPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<EvaluationPhrasesDO>()
                .eqIfPresent(EvaluationPhrasesDO::getPhraseText, reqVO.getPhraseText())
                .eqIfPresent(EvaluationPhrasesDO::getSort, reqVO.getSort())
                .eqIfPresent(EvaluationPhrasesDO::getRemark, reqVO.getRemark())
                .betweenIfPresent(EvaluationPhrasesDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(EvaluationPhrasesDO::getId));
    }

}